<template>
	<view class="tabBar" >
		<!-- 开始写下面的导航栏，我们就写四个功能，首页，消息，商城，我的这四个信息消息是挂号之类的 -->
		<uv-tabbar :value="value" @change="index=>value = index">
				<uv-tabbar-item 
				v-for="(tab,index) in tabList"
				:key="index"
				:text="tab.text"
				:icon="tab.icon"
				@click="navigateToPath(index)"
				></uv-tabbar-item>
				<<!-- uv-tabbar-item text="放映厅" icon="photo"></uv-tabbar-item>
				<uv-tabbar-item text="直播" icon="play-right"></uv-tabbar-item>
				<uv-tabbar-item text="我的" icon="account"></uv-tabbar-item> -->
		</uv-tabbar>
	</view>
</template>

<script setup>
import { ref ,onMounted} from 'vue';
let value=ref('0')
const tabList=ref([
	{text:'首页',icon:'home',path:'/pages/role/family/home'},
	{text:'消息',icon:'photo',path:'/pages/role/family/message'},
	{text:'商城',icon:'play-right',path:'/pages/role/family/store'},
	{text:'我的',icon:'account',path:'/pages/role/family/selfInfo'}
])

const navigateToPath=(index)=>{
	uni.navigateTo({
		url:tabList.value[index].path
	})
}
</script>

<style>
	       
</style>
